package com.ruiyian.project.road.mapper;

import com.ruiyian.project.road.domain.Dire;
import com.ruiyian.project.road.domain.DirePoint;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author chong
 * @email 673426164@qq.com
 * @create 2021/1/19
 * Desc: 道路方向
 */
public interface DireMapper {
    /**
     * 分页查询列表
     * @param dire
     * @return
     */
    List<Dire> selectList(Dire dire);

    /**
     * 根据道路id获取设备
     * @param dire
     * @return
     */
    List<Dire> selectListByRoadId(Dire dire);
    /**
     * 保存
     * @param dire
     */
    void save(Dire dire);

    void savePoint(DirePoint direPoint);

    /**
     * 根据名称查询
     * @param roadId
     * @param name
     * @return
     */
    Dire findName(@Param("roadId")Long roadId, @Param("name")String name);

    /**
     * 编辑
     * @param dire
     */
    void edit(Dire dire);

    /**
     * 删除
     * @param id
     */
    void delete(Long id);

    /**
     * 根据id获取对象
     * @param id
     * @return
     */
    Dire findOne(Long id);

    /**
     * 批量删除
     * @param list
     */
    void deleteBatch(List<Dire> list);


    List<Dire> findOneAll(Long roadId);

    List<DirePoint> queryByDireId(Long direId);


    List<DirePoint> queryByRoadId(Long roadId);


}
